<?php

/**
 * OwnerView
 */
require_once 'Application/Controllers/OwnerController.php';
class Application_Views_OwnerView{
    
    public function formInsert(){
        include_once 'Application/Views/owner/insertOwner.php';
        //header("Location: Application/Views/owner/insertOwner.php");   
    }
    
    public function showOwner($consult){
        //include_once 'Application/Views/view/header.php';        
        
                $num=count($consult);
?>
        <center>
            <table border="1">
                    <tr>
                            <td>DNI</td>
                            <td>Apellidos</td>
                            <td>Nombres</td>
                            <td>Sexo</td>
                            <td>Fecha</td>
                            <td>Direccion</td>
                            <td>Opcion</td>
                    </tr>
                    <?php
                    for($i=0;$i<$num;$i++){?>
                    <tr>                    
                            <td><?php echo $consult[$i][0];?></td>
                            <td><?php echo $consult[$i][1] ?></td>
                            <td><?php echo $consult[$i][2] ?></td>
                            <td><?php echo $consult[$i][3] ?></td>  
                            <td><?php echo $consult[$i][4] ?></td>
                            <td><?php echo $consult[$i][5] ?></td>
                            
                            <td><input type="button" value="Modificar" 
                                        onclick="window.open(
                                        'Application/Views/owner/modifyOwner.php?idOwner=<?php echo base64_encode($consult[$i][0]); ?>','content');"> 
                            </td>
                    </tr>
                    <?php }?> 
            </table>
            <!--<div>
                <?php include_once 'Application/Views/view/botonInicio.php'; //$this->inicio();  ?>
            </div>-->
        </center>
<?php    
       
        //$compaq=urlencode(serialize($consult));   
        //die($compaq);
        //include_once 'showOwner.php';
        //header("Location: Application/Views/owner/showOwner.php?consult=$compaq");
   }
   
   
   public function formModify(){
       //header("Location: Application/Views/owner/modifyOwner.php");  
       include_once 'Application/Views/owner/modifyOwner.php';
   }



    public function formListOwner($msg){
        ?>
        <div>
            
            <h1> <?php echo "$msg";  ?> </h1>
        </div>
<?php
    }
}